import service from '@/utils/request'


export default {
    test(testdata) {
        return service({
            //-- `飘符号。作用等价于“”  区别在于可以在``符号内使用表达式！！
            url: `/edu-teacher/test/${testdata}`,
            method: 'get',
        })
    },
    getAllList(id){
        return service({
            url:`/cart/selectAll/${id}`,
            method: 'post'
        })
    },
    update(index,number){
        return service({
            method: "post",
            url:`/cart/update/${index}/${number}`
        })

    },
    changeTicket(index,date){
        return service({
            method: "post",
            url:`/cart/changeTicket/${index}/${date}`
        })

    },

    delete(index){
        return service({
            method: "post",
            url: `/cart/delete/${index}`
        })
    },
    addOrder(index){
        return service({
            method: "post",
            url: `/order/AddOrder`,
            data: index
        })
    },
    pay(data){
        return service({
            method: "post",
            url: `/alipay`,
            data: data
        })
    },
    add(data){
        return service(
            {
                url:"cart/add",
                method:"post",
                data:data
            }
        )
    }

}

